home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / gfx / xfig_sup.lha / xfig_support / doc / manual / threepart.sty < prev    next >
Text File  |  1995-08-29  |  1KB  |  44 lines

  1. % Three part head and foot macros. 1/87
  2. % Lance Berc
  3. % Olsen & Associates    mcvax!unizh!olsen!lance@seismo.css.gov
  4. % Seefeldstrasse 233
  5. % CH-8008 Zurich
  6.  
  7. % How users can set the head and foot text.
  8. \def\lhead#1{\gdef\@lhead{#1}} \def\lfoot#1{\gdef\@lfoot{#1}}
  9. \def\chead#1{\gdef\@chead{#1}} \def\cfoot#1{\gdef\@cfoot{#1}}
  10. \def\rhead#1{\gdef\@rhead{#1}} \def\rfoot#1{\gdef\@rfoot{#1}}
  11.  
  12. % Initialization of the head and foot text.
  13. % By default the page number is at the center of the foot and everything
  14. % else is empty.
  15. \def\@lhead{} \def\@lfoot{}
  16. \def\@chead{} \def\@cfoot{{\rm \thepage}}
  17. \def\@rhead{} \def\@rfoot{}
  18.  
  19. % Put together a three part header or footer given the left, center and
  20. % right text. The \lap commands put the text into an hbox of zero size,
  21. % so overlapping text is not detected (it just overlaps).
  22. \def\@threepart#1#2#3{\rlap{#1} \hfil {#2} \hfil \llap{#3}}
  23.  
  24. % Swap the notices on odd and even pages when twosided.
  25. \def\ps@threepartheadings
  26.     {
  27.     \def\@oddhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  28.     \def\@oddfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  29.  
  30.     \if@twoside
  31.     \def\@evenhead{\@threepart{\@rhead}{\@chead}{\@lhead}}
  32.     \def\@evenfoot{\@threepart{\@rfoot}{\@cfoot}{\@lfoot}}
  33.     \else
  34.     \def\@evenhead{\@threepart{\@lhead}{\@chead}{\@rhead}}
  35.     \def\@evenfoot{\@threepart{\@lfoot}{\@cfoot}{\@rfoot}}
  36.     \fi
  37.     }
  38.  
  39. % Default page style
  40. \ps@threepartheadings
  41.  
  42. % Default footers
  43. \cfoot{\thepage}
  44.